<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>



</head>
<body>
	<h1>测试el表达式</h1>
	<hr>
	<ul>
		<li>普通字符串</li> hello(jsp脚本):<%=request.getAttribute("hello")%><br>
		hello(el表达式):${hello}
		<br>
		hello(el的内置对象：pageScope,requestScope,sessionScope,applicationScope)
		<br>
		如果不指定范围，它的搜索顺序为：pageScope,requestScope,sessionScope,applicationScope
		<br>
		<br>
		<br> ${requestScope.hello }
		<br> hello(el表达式：指定范围从session中取得：)值为“${sessionScope.hello }”
		<br>
		<hr>
		<p>
		<li>结构:采用.进行导航，称为存取器</li> 
		姓名：${user.name}
		<br> 规范是:name前加get,name首字母大写也是调用getName()方法
		<br> 年龄:${user.age }
		<br> 所属组：${user.group.name }
		<br>
		<hr>
		<p>
		<li>map--->采用.进行导航，称为存取器</li>
		<br> map.key1:${map.key1 }
		<br> map.key2:${map.key2 }
		<br>
		<hr>
		<p>
		<li>字符串数组:------>采用[]下标</li>
		<br> strArray[0]:${str_array[0]}
		<br> strArray[1]:${str_array[1]}
		<br> strArray[2]:${str_array[2]}
		<br> strArray[3]:${str_array[3]}
		<br> strArray[4]:${str_array[4]}
		<br>
		<hr>
		<p>
		<li>对象数组:------>采用[]下标</li> 
		users[0]:${users[0].name }
		<br> users[1]:${users[1].name }
		<br> users[2]:${users[2].name }
		<br> users[3]:${users[3].name }
		<br> users[4]:${users[4].name }
		<br>
		<hr>
		<p>
		<li>list:------>采用[]下标</li> 
		groupList[0].name:${groupList[0].name }
		<br> groupList[1].name:${groupList[1].name }
		<br> groupList[2].name:${groupList[2].name }
		<br> groupList[3].name:${groupList[3].name }
		<br> groupList[4].name:${groupList[4].name }
		<br>
		<hr>
		<p>
		<li>EL表达式对运算符的支持</li> 143+454=${143+454 }
		<br><%--150 div 30=${150 div 30 } --%> 
		<hr>
		<p>
		<li>测试empty</li> 
		tgb6:${empty tgb6 }
		<br> tgb7:${empty tgb7 }
		<br> tgb8:${empty tgb8 }
		<br> tgb9:${empty tgb9 }
		<br>
	</ul>
</body>
</html>